package com.alpha.dao.interfaces;

import java.sql.SQLException;
import java.util.ArrayList;

import javax.naming.NamingException;

import com.alpha.bom.Question;

public interface IQuestionDao {
	public void connect() throws NamingException, SQLException;
	public void disconnect() throws SQLException;
	public Question retrieveQuestion(int questionId) throws SQLException, NamingException;
	public int retrieveNextQuestionId() throws NamingException, SQLException;
	public ArrayList<Question> retrieveAllQuestions() throws SQLException, NamingException;
	public ArrayList<Question> retrieveQuestions(int examId) throws SQLException, NamingException;
	public boolean insertQuestion(Question question) throws NamingException, SQLException;
	public boolean insertQuestionToExam(int questionId, int examId) throws NamingException, SQLException;
	public boolean removeQuestionFromExam(int questionId, int examId) throws NamingException, SQLException;
	public boolean updateQuestion(Question question) throws NamingException, SQLException;
}
